from typing import TypeVar, Generic, Optional, Any
from pydantic import BaseModel, Field

T = TypeVar("T")


class ResponseModel(BaseModel, Generic[T]):
    code: int = Field(200, description="状态码")
    msg: str = Field("", description="提示信息")
    data: Optional[T] = Field(None, description="响应数据")
